package br.com.pyramides.facade.iface;

import java.io.Serializable;
import java.util.List;

import br.com.pyramides.dao.iface.IGenericDAO;
import org.hibernate.criterion.Criterion;

/**
 *
 * @author Lessandro
 */
public interface IGenericFacade<T, ID extends Serializable> {

    public T buscaPeloID(ID id);

    public List<T> buscaTodos();

    public T salva(T entity);

    public T atualiza(T entity);

    public void exclui(T entity);
    
    public T buscaUmPeloCriterio(Criterion... criterion);
    
    public void setGenericDAO(IGenericDAO<T, ID> genericDAO);

}
